package org.rayson.api.server;

import org.rayson.api.KeyValues;
import org.rayson.api.exception.RpcException;
import org.rayson.server.http.HttpServerResponse;

public interface ServerResponse {

	public abstract RpcException getException();

	public KeyValues getHeaders();

	public abstract Object getResult() throws RpcException;

	public abstract void setException(RpcException rpcException);

	public abstract void setResult(Object result);

	/**
	 * Convert this RPC server response to HTTP response.
	 */
	public HttpServerResponse toHttpResponse();
}
